package com.example.kafka;

/**
 * Created by dong peng on 2019/11/17.
 */
public class Test {

    public static void main(String[] args) throws InterruptedException {
        EventProcess eventProcess = new EventProcess();

        TopicInfo topicInfo = new TopicInfo();
        topicInfo.setTopic("testMq1");
        topicInfo.setIps("127.0.0.1");
        eventProcess.receiveConfigUpdate(topicInfo);

        Thread.sleep(5000);
        topicInfo = new TopicInfo();
        topicInfo.setTopic("testMq1");
        topicInfo.setIps("127.0.0.1,10.0.0.2");
        eventProcess.receiveConfigUpdate(topicInfo);


        Thread.sleep(5000);
        topicInfo = new TopicInfo();
        topicInfo.setTopic("testMq1");
        topicInfo.setIps("10.0.0.2");
        eventProcess.receiveConfigUpdate(topicInfo);

//         topicInfo = new TopicInfo();
//        topicInfo.setTopic("testMq1");
//        topicInfo.setIps("127.0.0.1");
//        eventProcess.receiveConfigUpdate(topicInfo);
    }
}
